<?php
date_default_timezone_set('PRC'); 
include "../../public/common/config.php";

$code = $_GET['code'];
$sql = "select indent.price,indent.num,shop.name,shop.img from indent left join shop on(indent.shop_id = shop.id) where code = '{$code}'";
$result = mysql_query($sql);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<!--<meta name="viewport" content="width=divice-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />-->
		<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
		<link rel="stylesheet" type="text/css" href="../public/css/common.css"/>
		<title></title>
	</head>
	<body>
		<table>
			<tr><th>名称</th><th>图片</th><th>价格</th><th>数量</th><th>合计</th></tr>
			<?php
			while($row = mysql_fetch_assoc($result)){
				echo "<tr>";
				echo "<td>{$row['name']}</td>";
				echo "<td><img src='../public/uploads/{$row['img']}' width='50' /></td>";
				echo "<td>{$row['price']}</td>";
				echo "<td>{$row['num']}</td>";
				echo "<td>" . $row['price'] * $row['num'] . "元</td>";
				echo "</tr>";
			}	
			?>
			
		</table>
	</body>
	
</html>
